package cn.jobstart.pubInter;

import cn.jobstart.pubInter.exception.SkException;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author sunke
* @Date 2020-12-11 10:20:59
* @description
*/

public interface IBaseFindDao<T extends  BaseIdDoMain<KeyType>, TS extends BaseSearch, KeyType> {

    T getDetail(KeyType id) throws SkException;

    List<T> getList(TS search) throws SkException;

    int getListCount(TS search) throws SkException;

    List<T> getAllList(TS search) throws SkException;

    /**
     * 查询统计
     * @param fieldSet
     * @param search
     * @return
     * @throws SkException
     */
    Map<String,Object> totalMap(Set<String> fieldSet, TS search) throws SkException;


    /**
     * 按需查询
     * @param fieldSet
     * @param search
     * @return
     * @throws SkException
     */
    List<T> getShowFieldList(Set<String> fieldSet, TS search) throws SkException;

}
